#include<iostream>
#include<vector>
using namespace std;

class Solution {
private:
	vector<string>ans;
	void dfs(int n, string temp, int count){
		if(!n && !count){
			ans.push_back(temp);
			return;
		}
		if(n)dfs(n - 1, temp + '(', count + 1);
		if(count)dfs(n, temp + ')', count - 1);
	}
public:
    vector<string> generateParenthesis(int n) {
        dfs(n, "", 0);
        return ans;
    }
};

int main(){
	return 0;
}
